package com.biz.primus.ms.product.trans;

import com.biz.primus.commodity.vo.CommodityVo;
import com.biz.primus.commodity.vo.frontend.ProductStockReqProductVo;
import com.google.common.base.Function;

import javax.annotation.Nullable;

/**
 * @author jiangnan
 * @Description: TODO
 * @create 2017-10-16-下午3:57
 */
public class CommodityVo2ProductStockReqVo implements Function<CommodityVo,ProductStockReqProductVo> {

    @Nullable
    @Override
    public ProductStockReqProductVo apply(@Nullable CommodityVo productRo) {
        ProductStockReqProductVo productStockReqProductVo = new ProductStockReqProductVo();
        productStockReqProductVo.setProductCode(productRo.getProductCode());
        productStockReqProductVo.setRapidProduct(productRo.getRapidProduct());
        productStockReqProductVo.setRapidProductItems(productRo.getRapidProductInfoVo());
        return productStockReqProductVo;
    }
}
